<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/12/15
  Time: 10:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath()+"/";%>
<html>
<head>
    <base href="<%=path%>">
    <title>Title</title>
    <link href="static/css/bootstrap.min.css?v=3.3.7" rel="stylesheet" />
    <link href="https://unpkg.com/bootstrap-table@1.19.1/dist/bootstrap-table.min.css" rel="stylesheet">

</head>
<style>
    form input{
        width:300px;
    }
</style>
<body>
<form class="form-horizontal" id="form1">
    <input type="hidden" name="id" value="${user.id}">
    <div class="form-group">
        <label  class="col-sm-2 control-label">登录名称</label>
        <div class="col-sm-10">
            <input type="text" name="loginAccount" value="${user.loginAccount}" class="form-control" >
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-2 control-label">登录密码</label>
        <div class="col-sm-10">
            <input type="text" name="loginPwd" value="${user.loginPwd}" class="form-control" >
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-2 control-label">手机</label>
        <div class="col-sm-10">
            <input type="text" name="mobile" value="${user.mobile}" class="form-control" >
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-2 control-label">邮箱</label>
        <div class="col-sm-10">
            <input type="email" name="email" value="${user.email}" class="form-control" >
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-2 control-label">性别</label>
        <div class="col-sm-10">
            <select class="form-control" name="sex">
                <option value="0">男</option>
                <option value="1">女</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-2 control-label">所属部门</label>
        <div class="col-sm-10">
            <select class="form-control" name="dept_id">
                <option value="0">男</option>
                <option value="1">女</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-2 control-label">所属角色</label>
        <div class="col-sm-10">
            <select class="form-control" name="sex_id">
                <option value="0">男</option>
                <option value="1">女</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-2 control-label">状态</label>
        <div class="col-sm-10">
            <select class="form-control" name="status">
                <option value="0">启用</option>
                <option value="1">禁用</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-2 control-label">备注</label>
        <div class="col-sm-10">
            <textarea class="form-control" rows="3"></textarea>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="button" id="save" class="btn btn-default">保存</button>
            <button type="reset" class="btn btn-default">重置</button>
        </div>
    </div>
</form>
</body>
<script src="static/js/jquery.min.js?v=2.1.4"></script>
<script src="static/js/bootstrap.min.js?v=3.3.7"></script>
<script src="https://unpkg.com/bootstrap-table@1.19.1/dist/bootstrap-table.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.15.3/dist/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="static/js/plugins/layer/layer.min.js"></script>
<script src="static/sofwin.js"></script>
<script>
    $(function(){
        $("#save").click(function(){
            $.operator.post('user/save',$("#form1").serialize(),function(ret){
                if(ret.code==200){
                    layer.msg('操作成功',function(){
                       // 关闭
                        window.parent.refresh();
                        window.parent.close();
                    });
                }else{
                    layer.msg(ret.message);
                }
            })
        })
    })
</script>
</html>
